package com.red.star.wechat.data.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.red.star.wechat.data.entity.bo.ImageAreaBo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

/**
 * @ProjectName: macalline-work-server
 * @Package: com.red.star.macalline.data.entity
 * @Description: 裂变图片活动
 * @Author: AMGuo
 * @CreateDate: 2018/9/25 下午5:14
 * @Version: 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "ImageActivity", description = "裂变图片活动")
@Table(name = "t_image_activity")
public class ImageActivity extends BaseEntity {

    @ApiModelProperty(value = "名称")
    private String name;

    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间", dataType = "java.lang.String")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private Date startTime;

    /**
     * 结束时间
     */
    @ApiModelProperty(value = "结束时间", dataType = "java.lang.String")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JSONField(format = "yyyy-MM-dd")
    private Date endTime;

    /**
     * 状态：0停用  1启用
     */
    @ApiModelProperty(value = "状态：0停用  1启用", example = "0")
    private Integer status;

    /**
     * 活动图片
     */
    @ApiModelProperty(value = "活动图片")
    private String image;

    /**
     * 是否删除  false未删除  true已删除
     */
    @ApiModelProperty(value = "是否删除  false未删除  true已删除")
    private Boolean isDelete;

    /**
     * 创建者mallCode
     */
    @ApiModelProperty(value = "创建者mallCode", example = "集团/商场")
    private String mallCode;

    /**
     * 创建者ID
     */
    @ApiModelProperty(value = "创建者ID")
    private Integer createAdmin;

    /**
     * 参与者mallCode
     */
    @ApiModelProperty(value = "参与者mallCode", example = "集团/商场")
    @Transient
    private String joinMallCode;

    /**
     * 参与人数
     */
    @Transient
    @ApiModelProperty(value = "参与人数", example = "0")
    private Integer imagePeoples = 0;

    /**
     * 图片生成次数
     */
    @Transient
    @ApiModelProperty(value = "图片生成次数", example = "0")
    private Integer imageNum = 0;

    /**
     * 公众号
     */
    @Transient
    @ApiModelProperty(value = "公众号")
    private boolean wxPublicAccount;

    /**
     * app
     */
    @Transient
    @ApiModelProperty(value = "appUrl")
    private String appUrl;

    /**
     * h5集合
     */
    @Transient
    @ApiModelProperty(value = "h5集合")
    private List<ImagePoster> h5List;
    /**
     * 外部h5集合
     */
    @Transient
    @ApiModelProperty(value = "外部h5集合")
    private List<ImagePoster> outsideH5List;
    /**
     * 竖版h5集合
     */
    @Transient
    @ApiModelProperty(value = "竖版h5集合")
    private List<ImagePoster> standH5List;
    /**
     * 疯狂h5集合
     */
    @Transient
    @ApiModelProperty(value = "疯狂h5集合")
    private List<ImagePoster> crazyH5List;

    /**
     * 小程序集合
     */
    @Transient
    @ApiModelProperty(value = "小程序")
    private List<ImagePoster> cxList;

    /**
     * 二维码类型
     */
    @Transient
    private String[] type;

    /**
     * h5二维码列表
     */
    @Transient
    private String[] h5Posters;
    /**
     * 竖版h5二维码列表
     */
    @Transient
    private String[] standH5Posters;
    /**
     * 疯狂h5二维码列表
     */
    @Transient
    private String[] crazyH5Posters;
    /**
     * 外部h5二维码列表
     */
    @Transient
    private String[] outsideH5Posters;
    /**
     * 小程序二维码列表
     */
    @Transient
    private String[] cxPosters;

    /**
     * 可参与商场 部分
     */
    @Transient
    @ApiModelProperty(value = "可参与商场")
    private String accessMallName = "";

    @Transient
    private String types;

    @Transient
    private String typeValues;

    /**
     * 可参与商场  全部
     */
    @Transient
    @ApiModelProperty(value = "可参与商场")
    private String partAccessMallName = "";


    @Transient
    private String accessMallVal;

    @Transient
    private String accessMallType;

    @Transient
    private List<ImageAreaBo> imageAreaBoList;

}
